package Test1230am;

public class Test15 {
    public static int m(int[] arr){
        int min = arr[0];
        for(int i = 1; i < arr.length; i++){
            if(arr[i] < min){
                if(min%2==0)
                    min = arr[i];
            }
        }
        return min;
    }
    public static void main(String[] args) {
        // (15)定义实现m方法：求数组中最小的偶数
        int[] arr = {1,2,3,4,5};
        int min = m(arr);
        System.out.println(min);
    }
}